package com.ousi.wx.service.Impl;

import com.ousi.wx.dao.ProductDao;
import com.ousi.wx.dao.ProductPhotoDao;
import com.ousi.wx.service.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Service
@Slf4j
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductDao productDao;

    @Autowired
    private ProductPhotoDao productPhotoDao;

    @Override
    public ArrayList<HashMap> selectProductNameAndId() {
        return productDao.selectProductNameAndId();
    }

    @Override
    public HashMap selectProductById(Integer id) {
        return productDao.selectProductById(id);
    }

    @Override
    public List<String> selectPhotoById(Integer productId) {
        return productPhotoDao.selectPhotoById(productId);
    }

}
